from python_baway.exercise.oop.ppt17_page43_shoot import Hero
from python_baway.common.xcommon import sep


class DecoratedHero(Hero):

    def __init__(self, name, skill, hp=100):
        Hero.__init__(self, name, skill)
        self.__hp = hp

    @property
    def skill(self):
        return self._Hero__skill

    @skill.setter
    def skill(self, s):
        self._Hero__skill = s

    @property
    def hp(self):
        return self.__hp

    @hp.setter
    def hp(self, hp):
        self.__hp = hp

    @property
    def name(self):
        return self.get_name()


nero = DecoratedHero('Nero', 'Hacking')
print(f'Skill of {nero.name}: {nero.skill}')
nero.skill = 'Network hacking'
print(f'Skill of {nero.name}: {nero.skill}')
print(f'HP of {nero.name}: {nero.hp}')
sep('End of testing DecoratedHero')
